﻿using System.Collections.Generic;
using System.Linq;
using Orchard.ContentManagement;
using Orchard.Environment.Extensions;
using System;
using Orchard.Security;
using Orchard;
using Nwazet.Commerce.Models;
using Orchard.Roles.Models;

namespace Rework.CommerceHistory.Models {
    [OrchardFeature("Rework.CommerceRoleAssignment")]
    public class CommerceRoleAssignmentPart : ContentPart<CommerceRoleAssignmentPartRecord>, IProductRoles {
        public CommerceRoleAssignmentPart(
            ) {
            Roles = new List<string>();
        }

        public int NumberOfPeriods { get { return Record.NumberOfPeriods; } set { Record.NumberOfPeriods = value; } }
        public PeriodOptions PeriodType { get { return Record.PeriodType; } set { Record.PeriodType = value; } }
        
        public IList<string> Roles { get; set; }
    }
}
